<?php
//=======================================
//###################################
// Kayako Web Solutions
//
// Source Copyright 2001-2004 Kayako Web Solutions
// Unauthorized reproduction is not allowed
// License Number: $%LICENSE%$
// $Author: vshoor $ ($Date: 2005/08/07 05:20:29 $)
// $RCSfile: client_misc.php,v $ : $Revision: 1.3 $ 
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
//###################################
//=======================================


if (!defined("INSWIFT")) {
	trigger_error("Unable to process $PHP_SELF", E_USER_ERROR);
}

// ======= Load Up the functions file =======
require_once ("./modules/livesupport/functions_livesupport.php");

// Try to get the session
if (!$session->fetchSession($_GET["sessionid"], SESSION_VISITOR))
{
	$isbanned = checkBannedStatus(true);
	if (!$isbanned)
	{
		$session->insertSession(SESSION_VISITOR, 0, $_GET["sessionid"], true);
		$_GET["isfirsttime"] = 1;
	}
}

// Update this session last activity
$dbCore->shutdownQuery("UPDATE `". TABLE_PREFIX ."sessions` SET `lastactivity` = '". DATENOW ."' WHERE `sessionid` = '". $dbCore->escape($_SWIFT["session"]["sessionid"]) ."';");	



if ($eventaction == "resetproactivestatus")
{
	resetVisitorStatus($_SWIFT["session"]["sessionid"]);
}

?>